<?php
namespace Home\Controller;
use Think\Controller;

class ApplyController extends CommonController {
	
    public function index(){
    	$uid = session('xuehao');
        //dump($uid);
        if (!$uid) {
            # code...
            $this->error('请先登录',U("Home/Public/login"));
        }
        $picture = M('Picture')->where(array('xuehao'=>session('xuehao'),'status'=>1))->find();
        if (empty($picture)) {
            $this->error('请上传照片',U("Home/Update/index"));
        }
        if (empty($picture['shear'])) {
            # code...
            $this->error('请剪切照片',U("Home/Update/edit_img"));
        }

	    	$this->success('2201:报名成功！');

    }
}